package com.dfbz.springboot_project.controller;

import com.dfbz.springboot_project.entity.Result;
import com.dfbz.springboot_project.service.PrivilegeService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("privilege")
public class PrivilegeController {
    @Autowired
    PrivilegeService privilegeService;
    @RequestMapping("selectAll")
    public Result selectAll(){
        return new Result(true,"查询成功",privilegeService.selectAll());
    }
    @RequestMapping("selectPrivilegesByRid")
    public Result selectPrivilegesByRid(@Param("Rid") Integer Rid){
        return new Result(true,"查询成功",privilegeService.selectPrivilegesByRid(Rid));
    }
}
